#include <iostream>
#include <unistd.h>
#include <signal.h>

using namespace std;

void myhander(int signo)
{
    cout<<"process get a signal : "<< signo << endl;
    exit(1);
}

int main()
{
    signal(SIGINT,myhander);    
    while(1)
    {
        cout<<"i am a process "<<endl;
        sleep(1);
    }

    return 0;
}